# -*- coding: utf-8 -*-
"""
Created on Wed May 15 14:52:04 2019

描述
    附件是《沉默的羔羊》中文版内容，请读入内容，分词后输出长度大于2且最多的单词。‪‬‪‬‪‬‪‬‪‬‮‬‪‬‫‬‪‬‪‬‪‬‪‬‪‬‮‬‫‬‪‬‪‬‪‬‪‬‪‬‪‬‮‬‫‬‫‬‪‬‪‬‪‬‪‬‪‬‮‬‫‬‮‬‪‬‪‬‪‬‪‬‪‬‮‬‪‬‪‬‪‬‪‬‪‬‪‬‪‬‮‬‫‬‪‬
    如果存在多个单词出现频率一致，请输出按照Unicode排序后最大的单词。‪‬‪‬‪‬‪‬‪‬‮‬‪‬‫‬‪‬‪‬‪‬‪‬‪‬‮‬‫‬‪‬‪‬‪‬‪‬‪‬‪‬‮‬‫‬‫‬‪‬‪‬‪‬‪‬‪‬‮‬‫‬‮‬‪‬‪‬‪‬‪‬‪‬‮‬‪‬‪‬‪‬‪‬‪‬‪‬‪‬‮‬‫‬‪‬

输入格式
    文件‪‬‪‬‪‬‪‬‪‬‮‬‪‬‫‬‪‬‪‬‪‬‪‬‪‬‮‬‫‬‪‬‪‬‪‬‪‬‪‬‪‬‮‬‫‬‫‬‪‬‪‬‪‬‪‬‪‬‮‬‫‬‮‬‪‬‪‬‪‬‪‬‪‬‮‬‪‬‪‬‪‬‪‬‪‬‪‬‪‬‮‬‫‬‪‬

输出格式
    字符串

@author: yaoyu
"""

import jieba

content = ''
with open('沉默的羔羊.txt', 'r', encoding='utf-8') as f:
    content = f.read()

words  = jieba.lcut(content)
a = {}
for i in words:
    if len(i)>2:
        if i not in a:
            a[i]=1
        else:
            a[i]+=1
        
    
b=list(a.items())
#print(b)
b = list(sorted(b, key=lambda x:x[1]))
print(b[-1][0])